package com.ljj.dolls;

import java.util.HashMap;
import java.util.Map;
import java.util.Random;

public class TestComplexKey {

    public static void main(String[] args) {
        Map<Key,Object> map=new HashMap<>();
        Random r=new Random(100);
        Long t1=System.currentTimeMillis();

        for(int i=0;i<100000000;i++){
            AKey a=new AKey(r.nextInt(),r.nextInt(),r.nextInt());
            map.put(a,1);
        }
        Long t2=System.currentTimeMillis();
        System.out.println(t2-t1);
        for(int i=0;i<100000000;i++){
            AKey a=new AKey(r.nextInt(),r.nextInt(),r.nextInt());
            map.get(a);
        }
        t1=System.currentTimeMillis();
        System.out.println(t1-t2);

    }
}
